<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>{$settings.site_name}</title>
	<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
	<center>
		<table cellspacing=0 cellpadding=2 border=0 width=100%>
			<tr>
				<th class=title>{$settings.site_name}</th>
			</tr>
		</table>
		<table cellspacing=1 cellpadding=2 border=0 width=100%>
			<tr>
				<td colspan=4 class=detailsbg1>
					Payout Statistics for <b>{$listing.name}</b>
				</td>
			</tr>
			<tr>
				<td colspan=4 class=detailsbg1>
					Payouts Ratio: <b>{$ratio*100}% 
					{if $ratio >= 1}
						<font color=red>in profit</font>
					{/if}</b>
				</td>
			</tr>
			<tr>
				<td colspan=4 class=detailsbg1>Payouts Found: <b>{$payouts}</b></td>
			</tr>
		</table>

		<table cellspacing=1 cellpadding=2  width=100% style="border:1px; border-style: outset;">
			<tr>
				<th class=title  style="border:1px; border-style: outset;">Date</th>
				<th class=title  style="border:1px; border-style: outset;">Type</th>	
				<th class=title  style="border:1px; border-style: outset;">Amount</th>
				<th class=title  style="border:1px; border-style: outset;">Comment</th>
			</tr>
			{if $stats} 
				{section name=s loop=$stats}
					<tr class={if $smarty.section.s.rownum % 2 !=0}event{/if}>
						<td  style="border:1px; border-style: outset;">{$stats[s].fdate}</td>
						<td  style="border:1px; border-style: outset;">
							{if $stats[s].type ==0 }
								Deposit
							{elseif $stats[s].type ==1 }
								Withdraw	 
							{/if}
						</td>
						<td align="right"  style="border:1px; border-style: outset;">${$stats[s].amount}</td>
						<td align=center  style="border:1px; border-style: outset;">{$stats[s].comment}</td>
					</tr>
				{/section} 
			{else}
			<tr>
				<td colspan=4 align=center>No Payouts.</td>
			</tr>
			{/if}
		</table>
	</center>
</body>
</html>
